<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Modificar Estudiante</title>
</head>

<body>
	<h1>MODIFICAR ESTUDANTE</h1>
	<table style="width: 100%">
		<tr>
			<td><a href="students.html">Lista De Alumnos</a></td>
			<td><a href="add.html">Agregar Alumnos</a></td>
			<td><a href="deleteLoad.html">Eliminar Alumnos</a></td>
		</tr>

	</table>

	<c:url var="updateStudianteUrl" value="/students/update.html" />
	<form:form modelAttribute="student" action="${updateStudianteUrl}"
		method="POST" name="update">
		<table border="1" align="center">

			<tr>
				<td>ID Estudiante</td>
				<td align="center" valign="middle"><c:out
						value="${student.studentId}" /></td>
			</tr>
			<tr>
				<td>Nombre</td>
				<td align="center" valign="middle"><input type="text"
					name="studentName" value="${student.studentName}"></td>
			<tr>
			</tr>
			<tr>
				<td>Localidad</td>
				<td><SELECT name="adress">
						<c:forEach items="${lista}" var="lista">
							<OPTION value="<c:out value="${lista.adressid}"/>">
								<c:out value="${lista.street}" />
							</OPTION>
						</c:forEach>
				</SELECT></td>
			<tr>
			</tr>

		</table>
		<br />
		<input type="hidden" name="studentId" value="${student.studentId}">


		<table border="0" style="text-align: center; margin: 0 auto;">

			<tr>
				<td><input type="submit" value="Modificar" /></td>
		</table>
	</form:form>

	<!-- ELIMINAR -->
	<form action="delete.html" method="post">
		<input type="hidden" name="studentId" value="${student.studentId}">
		<table border="0" style="text-align: center; margin: 0 auto;">

			<tr>
				<td><input type="submit" value="Eliminar" /></td>
		</table>
	</form>
</body>
</html>